package com.qf.controller;

import com.qf.entity.HappyBeanHistory;
import com.qf.service.HappyBeanHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
public class HappyBeanController {
    @Autowired
    private HappyBeanHistoryService happyBeanHistoryService;
    //根据用户id查询欢乐豆流水记录列表
    @RequestMapping("/happybean/list")
    public List<HappyBeanHistory> queryListByUid(Integer uid){
        return happyBeanHistoryService.queryHistoryByUid(uid);
    }
}
